vs.1.1

#include "_defines.vsh"

//*********************************************************
//
// Input Registers used:
//   v0 - The point position
//   v1 - The point speed
//   v2 - World point size
//   v3 - The point color
//
// Output Registers used:
//   oPos - The vertex output position.
//   oPts - Screen point size
//   oD0  - light color
//
// Constant Registers used:
//   c[0-3]    - Model view projection matrix.
//   c[4].xyz  - Delta time
//   c[5]      - View port dimensions
//
//*********************************************************

def c[CONSTANT_0_05_1_2], 0, 0.5, 1, 2

mov inPos, v0
mov inNormal, v1

#include "_fog.vsh"

// r1 = speed * dt + position
mad r1, inNormal, c[TIME_ELAPSED], inPos

// oPos = r0 = MVP * r1
m4x4 r0, r1, c[MODEL_VIEW_PROJECTION]
mov oPos, r0

// r2.x = world_size * viewport.y / oPos.z
rcp r2.x, r0.z
mul r2.x, r2.x, v2.x
mul r2.x, r2.x, c[VIEWPORT_DIMENSION].y
mov oPts, r2.x

mov r0, v3
mul r0, r0, inNormal.w
mov oD0, r0
mov oD1, c[CONSTANT_0_05_1_2].x
